package com.yonyou.pmclouds.workconnect.mapper;

import java.util.List;

import com.yonyou.pmclouds.problemlog.entity.ProblemLogVO;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import com.yonyou.pmclouds.basecom.cache.RedisCache;
import com.yonyou.pmclouds.basecom.dao.BaseMapper;
import com.yonyou.pmclouds.workConnect.entity.WorkConnectVO;
@CacheNamespace(implementation = RedisCache.class)
public interface WorkConnectMapper extends BaseMapper<WorkConnectVO>{

	 @Select("select * from pm_workconnect where   pk_project = #{pk_project} and dr = 0  order by creationtime desc")
	 @ResultMap("getMap")
	 List<WorkConnectVO> selectByPkProject(String pk_project);
	 
	 Integer selectRefByCode(@Param("code")String code,@Param("ids") String[] ids);

	WorkConnectVO[] queryByCondition(@Param("pkProjects")String[] pkProjects,
									@Param("creators") String[] creators,
									@Param("startDate") String startDate,
									@Param("endDate") String endDate,
									@Param("billStatus") int[] billStatus,
									 @Param("pkorgs") String[] pkorgs,
									 @Param("pkContactTypes") String[] pkContactTypes,
									 @Param("tenantId") String tenantId,
									@Param("start") int start,
									@Param("size") int size);
	int countByCondition(@Param("pkProjects")String[] pkProjects,
						 @Param("creators") String[] creators,
						 @Param("startDate") String startDate,
						 @Param("endDate") String endDate,
						 @Param("pkorgs") String[] pkorgs,
						 @Param("pkContactTypes") String[] pkContactTypes,
						 @Param("tenantId") String tenantId,
						 @Param("billStatus") int[] billStatus);
}
